<?php

namespace common\models\DAO;

use Yii;

/**
 * This is the model class for table "mx_user_charge".
 *
 * @property string $id
 * @property string $userID
 * @property integer $status
 * @property string $createTime
 * @property string $money
 * @property string $card
 * @property string $order
 * @property string $updateTime
 * @property integer $sourceID
 * @property integer $typeID
 * @property integer $placeID
 * @property string $gmID
 */
class UserCharge extends \yii\db\ActiveRecord
{
    /**
     * @inheritdoc
     */
    public static function tableName()
    {
        return 'mx_user_charge';
    }

    /**
     * @inheritdoc
     */
    public function rules()
    {
        return [
            [['userID', 'createTime', 'money', 'order'], 'required'],
            [['userID', 'status', 'createTime', 'money', 'updateTime', 'sourceID', 'typeID', 'placeID', 'gmID'], 'integer'],
            [['card', 'order'], 'string', 'max' => 50],
            [['order'], 'unique'],
        ];
    }

    /**
     * @inheritdoc
     */
    public function attributeLabels()
    {
        return [
            'id' => '主键id',
            'userID' => '用户id',
            'status' => '0：失败，1成功 2进行中',
            'createTime' => '创建时间',
            'money' => '充值金额',
            'card' => '卡号',
            'order' => '订单号',
            'updateTime' => '支付成功时间',
            'sourceID' => '来源id 1wap 2web 3app',
            'typeID' => '1充值2提现',
            'placeID' => '1银行2第三方3财务',
            'gmID' => '通用id',
        ];
    }
}
